use actix_web::web;

use crate::auth::Auth;

mod category;
mod link;
mod menu;
mod post;
mod tag;
mod user;

pub fn config_admin(cfg: &mut web::ServiceConfig) {
    cfg.service(
        web::scope("/admin")
            .wrap(Auth)
            .configure(category::config_admin_category)
            .configure(link::config_admin_link)
            .configure(menu::config_admin_menu)
            .configure(post::config_admin_post)
            .configure(tag::config_admin_tag)
            .configure(user::config_admin_user),
    );
}
